
const Koa = require('koa')
const log = require('./log')

const app= new Koa();

// app.use(log())

app.use(async (ctx,next)=>{
  console.log('1 next 之前')
 await next();
  console.log('1 next 之后')
})

app.use(async (ctx,next)=>{
  console.log('2 next 之前')
  await next()
  console.log('2 next 之后')
})

app.use( (ctx,next)=>{
  console.log('3 next 之前')
  console.log('3 next 之后')
})


app.listen(3000,()=>{
  console.log('localhost:3000 start')
})